package com.demo.service.impl;

import com.demo.dao.AccountDao;
import com.demo.pojo.Account;
import com.demo.service.AccountService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * @ClassName a
 * @Description TODO
 * @Author Windy
 * @Date 2022/8/30 15:53
 * @Version 1.0
 **/
@Service(value = "accountServiceImpl")
public class AccountServiceImpl  implements AccountService {

    @Autowired
    private AccountDao accountDao;


    public List<Account> findAllAccount() {
        return accountDao.findAllAccount();
    }

    public Account findAccountById(Integer accountId) {
        return accountDao.findAccountById(accountId);
    }

    public void saveAccount(Account account) {
        accountDao.saveAccount(account);
    }

    public void updateAccount(Account account) {
        accountDao.updateAccount(account);
    }

    public void deleteAccount(Integer accountId) {
        accountDao.deleteAccount(accountId);
    }
}
